package hn.sigit.dao.hnd.ladmshadow;

import hn.sigit.model.hnd.ladmshadow.SpatialZone;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;

public class SpatialZoneDAO extends SpatialUnitDAO {
	private static final long serialVersionUID = 1L;

	
	public static SpatialZone loadSpatialZoneById(long id) {
		return loadSpatialZoneById(getSession(), id);
	}
	public static SpatialZone loadSpatialZoneById(Session session, long id) {
		Criteria criteria = session.createCriteria(SpatialZone.class);
		criteria.add(Restrictions.eq("suID", id));
		
		return (SpatialZone) criteria.uniqueResult();
	}

}
